<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
        #parse("inc/hdsrc.html")
        <script type="text/javascript" src="${ctx}/js/formvalid.js" charset="utf-8"></script>
        <script type="text/javascript" src="${ctx}/js/address.js" charset="utf-8"></script>
        <style type="text/css">
#fb_box{width:660px;}
#fb_box table{width:650px;height:420px;}
#fb_box table tr{height:46px;}
#fb_box table td{font-size:14px;padding-left:9px;height:46px;}
#fb_box {border:1px #CCC dotted;}
#fb_box .s1{
	height:22px;border: solid 1px #C7C7C7;
        background:url(${ctx}/img/textbg.png) #fff repeat-x;
	-webkit-border-radius: .3em; 
	-moz-border-radius: .3em;
	border-radius: .3em;
	-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.1);
	-moz-box-shadow: 0 1px 2px rgba(0,0,0,.1);
	box-shadow: 0 1px 2px rgba(0,0,0,.1);
	width:200px;
	padding:3px;
	font-size:14px;
	}
#fb_box textarea.s2{
         border: solid 1px #C7C7C7;
	-webkit-border-radius: .3em; 
	-moz-border-radius: .3em;
	border-radius: .3em;
	-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.1);
	-moz-box-shadow: 0 1px 2px rgba(0,0,0,.1);
	box-shadow: 0 1px 2px rgba(0,0,0,.1);
	padding:3px;
	font-size:14px;  
        }
#fb_box input.s1:hover,#fb_box textarea.s2:hover{border-color:red;background-color:#ffffff;}
#fb_box input.s1:focus,#fb_box textarea.s2:focus{background-color:#ffffff;border-color:#F87300;color:#000000;}
span.red{color:red;}
span.tip{color:#d0d0d0;font-size:12px;}
h2.s3{padding:5px 0px 5px 19px;color:#ED8714;font-size:18px;}
</style>
    </head>
    <body>
   <div id="fb_box">
       <h2 class="s3">反馈留言</h2>
        <form id="fb_frm" name="fb_frm" action="" method="post" enctype="application/x-www-form-urlencoded" target="_top">
        <table>
  <tr>
    <td width="96" height="30" align="right">姓 名：</td>
    <td colspan="4">
      <input type="text" name="nick" id="nick" tabindex="1" class="s1" maxlength="16"  valid="required" errmsg="姓名不能为空!"/>
      <span class="red">*</span>
      <select id="sex" name="sex" class="s1" style="width:90px;height:26px;">
          <option selected="selected" value="男">先生</option>
          <option value="女">女士</option>
      </select>
    </td>
    <td width="166"><div id="err_nick"></div></td>
    </tr>
  <tr>
    <td height="29" align="right">联系电话：</td>
    <td colspan="4">
      <input type="text" name="tel" id="tel" tabindex="2" class="s1" maxlength="20" valid="required|isTelephone" errmsg="联系电话不能为空!|电话号码或手机号码错误!"/>
    <span class="red">*</span>
    <span class="tip">11位手机号</span>
    </td>
    <td><div id="err_tel"></div></td>
    </tr>
  <tr>
    <td height="29" align="right">邮 箱：</td>
    <td colspan="4">
      <input type="text" name="email" id="email" tabindex="3" class="s1" maxlength="60" valid="isEmail" errmsg="邮箱格式错误!"/>
    <span class="red"></span>
    </td>
    <td><div id="err_email"></div></td>
    </tr>
    <tr>
    <td height="29" align="right">地 区：</td>
    <td colspan="4">
<select name="province" id="province" class="s1" style="width:110px;height:26px;"></select>
<select name="city" id="city" class="s1" style="width:110px;height:26px;"></select>
<select name="district" id="district" class="s1" style="width:110px;height:26px;"></select>
<input type="hidden" id="cityarea" name="cityarea" value="" />
    </td>
    <td></td>
    </tr>
  <tr>
    <td align="right">标 题：</td>
    <td colspan="4">
      <input type="text" name="title" id="title" tabindex="4" class="s1" maxlength="30" valid="required" errmsg="标题不能为空!"/>
    <span class="red">*</span>
    <span class="tip">30个字符,描述反馈内容</span>
    </td>
    <td><div id="err_title"></div></td>
    </tr>
  <tr>
    <td height="46" align="right">反馈内容：</td>
    <td colspan="3">
        <textarea name="msg" id="msg" cols="45" rows="5" tabindex="5" class="s2" valid="required|limit" min="2" max="500" errmsg="反馈内容不能为空!|内容字数请控制在500个字内."></textarea>
    <span class="red">*</span><br/>
    <span class="tip">限500个字</span>
    </td>
    <td colspan="2"><div id="err_msg"></div></td>
    </tr>
  <tr>
    <td align="right">验 证 码：</td>
    <td width="125">
        <input type="text" name="vcode" id="vcode" tabindex="6" style="width:90px;" class="s1" onfocus="VIMG.reload('s');"  valid="required" errmsg="验证码不能为空!"><span class="red">*</span></td>
    <td width="238"><img id="codeimg" src="${ctx}/img/vcode.jpg" width="93" height="29" align="middle" onclick="VIMG.reload();" title="点击图片刷新校验码" alt="点击图片刷新校验码"/></td>
    <td colspan="3"><div id="err_vcode"></div></td>
    </tr>
  <tr>
      <td colspan="6" align="center"><input type="button" name="submitBtn" id="submitBtn" onclick="FB.submit();" value="提交反馈" class="button orange"></td>
    </tr>
</table>

        </form>
        </div>

<script type="text/javascript">
addressInit('province', 'city', 'district');
VIMG.set(def.ctx+'/auth/code.srv');
initValid(ut.e('fb_frm'));
var FB={
submit:function(){
var area = [$('#province').val(),$('#city').val(),$('#district').val()].join(' ');
$('#cityarea').val(area.indexOf('-')<0?area:'-');
var $rb=$('#submitBtn');
if(validator(ut.e('fb_frm'))){
$rb.attr('disabled','disabled');
$.post(def.ctx+'/feedback/save.shtm',$('#fb_frm').serialize(),function(x){
    var r = $.trim(x);
    if(r=='ok'){
        alert('成功提交反馈信息.');
        ut.reload('?t='+ut.r());
    }else{
        alert(r);
        VIMG.reload();
        $rb.removeAttr('disabled');
    }
});
}
}
};
        </script>
    </body>
</html>